home *** CD-ROM | disk | FTP | other *** search
- Path: goanna.cs.rmit.EDU.AU!not-for-mail
- From: ok@goanna.cs.rmit.EDU.AU (Richard A. O'Keefe)
- Newsgroups: comp.lang.ada,comp.lang.c,comp.lang.c++
- Subject: Re: C/C++ knocks the crap out of Ada
- Date: 19 Feb 1996 17:43:31 +1100
- Organization: Comp Sci, RMIT, Melbourne, Australia
- Message-ID: <4g966j$cr8@goanna.cs.rmit.EDU.AU>
- References: <00001a73+00002504@msn.com> <4etcmm$lpd@nova.dimensional.com> <3114d8fb.5a455349@zesi.ruhr.de> <4f5h5t$f13@vixen.cso.uiuc.edu> <4g1bgf$l5@mailhub.scitec.com.au> <312515DF.7D3B@cmlj.demon.co.uk> <4g5sas$787@goanna.cs.rmit.EDU.AU>
- NNTP-Posting-Host: goanna.cs.rmit.edu.au
- X-Newsreader: NN version 6.5.0 #0 (NOV)
-
- rav@goanna.cs.rmit.EDU.AU (++ robin) writes:
- >---It's other things besides -- like, how to find a square root, how to do
- >simple I/O.
-
- How to do a square root:
-
- Step 1 (applies to all programming languages)
- Look up square root in the manual.
-
- Step 2 (applies to all programming languages)
- Do what the Fine Manual says.
-
- In Ada, use the index, which points you to A.5.1, and do
-
- with Ada.Numeric_Elementary_Functions;
- use Ada.Numeric_Elementary_Functions;
-
- ...
- sqrt(X)
- ...
-
- Section G.2.4 even gives you error bounds on the result, which no other
- language standard I've checked does. Just because of that, I'd rather
- do a square root in Ada than anything else.
-
- Simple I/O:
-
- Step 1
- Look it up in the manual
- Step 2
- Do what the Fine Manual says.
-
- *SIMPLE* I/O involves withing and using a couple of standard packages,
- and then using Put, New_Line, Get, and Skip_Line. Pretty darned simple.
- It has not been a problem for first-year students at this university.
-
- Ada does not support Fortran-style formatted I/O, nor PL/I style
- formatted or pictured I/O (but see Interfaces.COBOL).
-
- --
- Election time; but how to get Labour _out_ without letting Liberal _in_?
- Richard A. O'Keefe; http://www.cs.rmit.edu.au/~ok; RMIT Comp.Sci.
-